Integrand size = 24, antiderivative size = 205 \[ \int \tan ^4(c+d x) (a+i a \tan (c+d x))^m \, dx=\frac {2 i (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}-\frac {i \operatorname {Hypergeometric2F1}\left (1,m,1+m,\frac {1}{2} (1+i \tan (c+d x))\right ) (a+i a \tan (c+d x))^m}{2 d m}-\frac {i m \tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}+\frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (3+m)}+\frac {i \left (6+3 m+m^2\right ) (a+i a \tan (c+d x))^{1+m}}{a d (1+m) (2+m) (3+m)} \]
[Out]
Time = 0.44 (sec) , antiderivative size = 205, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3641, 3678, 3673, 3608, 3562, 70} \[ \int \tan ^4(c+d x) (a+i a \tan (c+d x))^m \, dx=-\frac {i (a+i a \tan (c+d x))^m \operatorname {Hypergeometric2F1}\left (1,m,m+1,\frac {1}{2} (i \tan (c+d x)+1)\right )}{2 d m}-\frac {i m \tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d \left (m^2+5 m+6\right )}+\frac {2 i (a+i a \tan (c+d x))^m}{d \left (m^2+5 m+6\right )}+\frac {i \left (m^2+3 m+6\right ) (a+i a \tan (c+d x))^{m+1}}{a d (m+1) (m+2) (m+3)}+\frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (m+3)} \]
[In]
[Out]
Rule 70
Rule 3562
Rule 3608
Rule 3641
Rule 3673
Rule 3678
Rubi steps \begin{align*} \text {integral}& = \frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (3+m)}-\frac {\int \tan ^2(c+d x) (a+i a \tan (c+d x))^m (3 a+i a m \tan (c+d x)) \, dx}{a (3+m)} \\ & = -\frac {i m \tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}+\frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (3+m)}-\frac {\int \tan (c+d x) (a+i a \tan (c+d x))^m \left (-2 i a^2 m+a^2 \left (6+3 m+m^2\right ) \tan (c+d x)\right ) \, dx}{a^2 (2+m) (3+m)} \\ & = -\frac {i m \tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}+\frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (3+m)}+\frac {i \left (6+3 m+m^2\right ) (a+i a \tan (c+d x))^{1+m}}{a d (1+m) (2+m) (3+m)}-\frac {\int (a+i a \tan (c+d x))^m \left (-a^2 \left (6+3 m+m^2\right )-2 i a^2 m \tan (c+d x)\right ) \, dx}{a^2 (2+m) (3+m)} \\ & = \frac {2 i (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}-\frac {i m \tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}+\frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (3+m)}+\frac {i \left (6+3 m+m^2\right ) (a+i a \tan (c+d x))^{1+m}}{a d (1+m) (2+m) (3+m)}+\int (a+i a \tan (c+d x))^m \, dx \\ & = \frac {2 i (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}-\frac {i m \tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}+\frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (3+m)}+\frac {i \left (6+3 m+m^2\right ) (a+i a \tan (c+d x))^{1+m}}{a d (1+m) (2+m) (3+m)}-\frac {(i a) \text {Subst}\left (\int \frac {(a+x)^{-1+m}}{a-x} \, dx,x,i a \tan (c+d x)\right )}{d} \\ & = \frac {2 i (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}-\frac {i \operatorname {Hypergeometric2F1}\left (1,m,1+m,\frac {1}{2} (1+i \tan (c+d x))\right ) (a+i a \tan (c+d x))^m}{2 d m}-\frac {i m \tan ^2(c+d x) (a+i a \tan (c+d x))^m}{d \left (6+5 m+m^2\right )}+\frac {\tan ^3(c+d x) (a+i a \tan (c+d x))^m}{d (3+m)}+\frac {i \left (6+3 m+m^2\right ) (a+i a \tan (c+d x))^{1+m}}{a d (1+m) (2+m) (3+m)} \\ \end{align*}
Time = 1.24 (sec) , antiderivative size = 136, normalized size of antiderivative = 0.66 \[ \int \tan ^4(c+d x) (a+i a \tan (c+d x))^m \, dx=\frac {(a+i a \tan (c+d x))^m \left (-i \left (6+11 m+6 m^2+m^3\right ) \operatorname {Hypergeometric2F1}\left (1,m,1+m,\frac {1}{2} (1+i \tan (c+d x))\right )-2 m \sec ^2(c+d x) \left (3+m+\left (5+4 m+m^2\right ) \cos (2 (c+d x))-i (1+m) \sin (2 (c+d x))\right ) (-i+\tan (c+d x))\right )}{2 d m (1+m) (2+m) (3+m)} \]
[In]
[Out]
\[\int \left (\tan ^{4}\left (d x +c \right )\right ) \left (a +i a \tan \left (d x +c \right )\right )^{m}d x\]
[In]
[Out]
\[ \int \tan ^4(c+d x) (a+i a \tan (c+d x))^m \, dx=\int { {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{m} \tan \left (d x + c\right )^{4} \,d x } \]
[In]
[Out]
\[ \int \tan ^4(c+d x) (a+i a \tan (c+d x))^m \, dx=\int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{m} \tan ^{4}{\left (c + d x \right )}\, dx \]
[In]
[Out]
\[ \int \tan ^4(c+d x) (a+i a \tan (c+d x))^m \, dx=\int { {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{m} \tan \left (d x + c\right )^{4} \,d x } \]
[In]
[Out]
\[ \int \tan ^4(c+d x) (a+i a \tan (c+d x))^m \, dx=\int { {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{m} \tan \left (d x + c\right )^{4} \,d x } \]
[In]
[Out]
Timed out. \[ \int \tan ^4(c+d x) (a+i a \tan (c+d x))^m \, dx=\int {\mathrm {tan}\left (c+d\,x\right )}^4\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^m \,d x \]
[In]
[Out]